home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14960 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: bmtlh10.bnr.ca!news
  2. From: John Hickin <hickin@bnr.ca>
  3. Newsgroups: comp.lang.c++,gnu.g++.help
  4. Subject: Re: Unable to compile inline functions
  5. Date: 2 Apr 1996 21:35:36 GMT
  6. Organization: Bell Northern Research
  7. Message-ID: <4js6j8$7p3@bmtlh10.bnr.ca>
  8. References: <4js108$pm4@ncar.ucar.edu>
  9. NNTP-Posting-Host: bmtlh520.bnr.ca
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
  14. X-URL: news:4js108$pm4@ncar.ucar.edu
  15.  
  16. Your inlines should appear in a public header file.
  17. The class header is an ideal place.  You can put them outside the class
  18. definition at the bottom of the file.  This way you don't pollute the
  19. interface with implementation details and, more importantly, you can roll
  20. out the inline definitions in the 'best' order which means inlines that
  21. use inlines come after the ones they depend on.  This isn't required by
  22. C++ but some versions of g++, for example, does a lot better if you do 
  23. this than if you don't.
  24.  
  25. -- 
  26. John Hickin      Nortel Technology, Montreal, Quebec
  27. (514) 765-7924   hickin@nortel.ca
  28.  
  29.